package com.kgc.personcommon.pojo;


import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;

public class User implements Serializable {

  private static final long serialVersionUID = 1L;

  private int id;
  private String account;
  private String name;
  private String password;
  private int sex;
  private String company;
  private List<Role> roles;
  private List<Integer> rids;
  private int is_delete;
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
  private Date createDate;
  private String createUser;
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
  private Date updateDate;
  private String updateUser;


  public int getId() {
    return id;
  }

  public void setId(int id) {
    this.id = id;
  }


  public String getAccount() {
    return account;
  }

  public void setAccount(String account) {
    this.account = account;
  }


  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }


  public String getPassword() {
    return password;
  }

  public void setPassword(String password) {
    this.password = password;
  }


  public int getSex() {
    return sex;
  }

  public void setSex(int sex) {
    this.sex = sex;
  }


  public String getCompany() {
    return company;
  }

  public void setCompany(String company) {
    this.company = company;
  }

  public List<Role> getRoles() {
    return roles;
  }

  public void setRoles(List<Role> roles) {
    this.roles = roles;
  }

  public List<Integer> getRids() {
    return rids;
  }

  public void setRids(List<Integer> rids) {
    this.rids = rids;
  }

  public int getIs_delete() {
    return is_delete;
  }

  public void setIs_delete(int is_delete) {
    this.is_delete = is_delete;
  }

  public Date getCreateDate() {
    return createDate;
  }

  public void setCreateDate(Date createDate) {
    this.createDate = createDate;
  }


  public String getCreateUser() {
    return createUser;
  }

  public void setCreateUser(String createUser) {
    this.createUser = createUser;
  }


  public Date getUpdateDate() {
    return updateDate;
  }

  public void setUpdateDate(Date updateDate) {
    this.updateDate = updateDate;
  }


  public String getUpdateUser() {
    return updateUser;
  }

  public void setUpdateUser(String updateUser) {
    this.updateUser = updateUser;
  }


  @Override
  public String toString() {
    return "User{" +
            "id=" + id +
            ", account='" + account + '\'' +
            ", name='" + name + '\'' +
            ", password='" + password + '\'' +
            ", sex=" + sex +
            ", company='" + company + '\'' +
            ", roles=" + roles +
            ", createDate=" + createDate +
            ", createUser='" + createUser + '\'' +
            ", updateDate=" + updateDate +
            ", updateUser='" + updateUser + '\'' +
            '}';
  }
}
